/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Redis Instance Order API
查询缓存Redis订单结果

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

#import <Foundation/Foundation.h>
#import <JDCloudOCSDKRedis/RedisApiModel.h>


@implementation RedisDescribeBackupPolicyRequest
-(id) initWithRegion:(NSString *)regionId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisCreateBackupRequest
-(id) initWithRegion:(NSString *)regionId
fileName:(NSString*)fileName
backupType:(NSNumber*)backupType
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.fileName = fileName;
    self.backupType = backupType;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
fileName:(NSString*)fileName
backupType:(NSNumber*)backupType
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.fileName = fileName;
    self.backupType = backupType;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self fileName])
    {
        [result setValue:[self fileName] forKey:@"fileName"];
    }
    if([self backupType])
    {
        [result setValue:[self backupType] forKey:@"backupType"];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.fileName = [dictionary objectForKey:@"fileName"];
    self.backupType = [dictionary objectForKey:@"backupType"];
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisCreateBackupResult
-(id) initWithBaseId:(NSString*) baseId { 
    self.baseId = baseId;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self baseId])
    {
        [result setValue:[self baseId] forKey:@"baseId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.baseId = [dictionary objectForKey:@"baseId"];
    return self;
} 

@end
@implementation RedisDescribeBackupPolicyResult
-(id) initWithBackupPeriod:(NSString*) backupPeriod
        backupTime:(NSString*)backupTime
        nextBackupTime:(NSString*)nextBackupTime { 
    self.backupPeriod = backupPeriod;               
    self.backupTime = backupTime;               
    self.nextBackupTime = nextBackupTime;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self backupPeriod])
    {
        [result setValue:[self backupPeriod] forKey:@"backupPeriod"];
    }
    if([self backupTime])
    {
        [result setValue:[self backupTime] forKey:@"backupTime"];
    }
    if([self nextBackupTime])
    {
        [result setValue:[self nextBackupTime] forKey:@"nextBackupTime"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.backupPeriod = [dictionary objectForKey:@"backupPeriod"];
    self.backupTime = [dictionary objectForKey:@"backupTime"];
    self.nextBackupTime = [dictionary objectForKey:@"nextBackupTime"];
    return self;
} 

@end
@implementation RedisModifyCacheInstanceAttributeRequest
-(id) initWithRegion:(NSString *)regionId
cacheInstanceName:(NSString*)cacheInstanceName
cacheInstanceDescription:(NSString*)cacheInstanceDescription
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.cacheInstanceName = cacheInstanceName;
    self.cacheInstanceDescription = cacheInstanceDescription;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
cacheInstanceName:(NSString*)cacheInstanceName
cacheInstanceDescription:(NSString*)cacheInstanceDescription
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.cacheInstanceName = cacheInstanceName;
    self.cacheInstanceDescription = cacheInstanceDescription;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self cacheInstanceName])
    {
        [result setValue:[self cacheInstanceName] forKey:@"cacheInstanceName"];
    }
    if([self cacheInstanceDescription])
    {
        [result setValue:[self cacheInstanceDescription] forKey:@"cacheInstanceDescription"];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cacheInstanceName = [dictionary objectForKey:@"cacheInstanceName"];
    self.cacheInstanceDescription = [dictionary objectForKey:@"cacheInstanceDescription"];
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisDescribeSlowLogRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
startTime:(NSString*)startTime
endTime:(NSString*)endTime
shardId:(NSString*)shardId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.startTime = startTime;
    self.endTime = endTime;
    self.shardId = shardId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
startTime:(NSString*)startTime
endTime:(NSString*)endTime
shardId:(NSString*)shardId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.startTime = startTime;
    self.endTime = endTime;
    self.shardId = shardId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self shardId])
    {
        [result setValue:[self shardId] forKey:@"shardId"];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.shardId = [dictionary objectForKey:@"shardId"];
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisResetCacheInstancePasswordRequest
-(id) initWithRegion:(NSString *)regionId
password:(NSString*)password
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.password = password;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
password:(NSString*)password
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.password = password;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self password])
    {
        [result setValue:[self password] forKey:@"password"];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.password = [dictionary objectForKey:@"password"];
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisDescribeBackupsRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
startTime:(NSString*)startTime
endTime:(NSString*)endTime
baseId:(NSString*)baseId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.startTime = startTime;
    self.endTime = endTime;
    self.baseId = baseId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
startTime:(NSString*)startTime
endTime:(NSString*)endTime
baseId:(NSString*)baseId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.startTime = startTime;
    self.endTime = endTime;
    self.baseId = baseId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self startTime])
    {
        [result setValue:[self startTime] forKey:@"startTime"];
    }
    if([self endTime])
    {
        [result setValue:[self endTime] forKey:@"endTime"];
    }
    if([self baseId])
    {
        [result setValue:[self baseId] forKey:@"baseId"];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    self.startTime = [dictionary objectForKey:@"startTime"];
    self.endTime = [dictionary objectForKey:@"endTime"];
    self.baseId = [dictionary objectForKey:@"baseId"];
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisDeleteCacheInstanceRequest
-(id) initWithRegion:(NSString *)regionId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisDescribeClusterInfoRequest
-(id) initWithRegion:(NSString *)regionId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisModifyBackupPolicyRequest
-(id) initWithRegion:(NSString *)regionId
backupTime:(NSString*)backupTime
backupPeriod:(NSString*)backupPeriod
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.backupTime = backupTime;
    self.backupPeriod = backupPeriod;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
backupTime:(NSString*)backupTime
backupPeriod:(NSString*)backupPeriod
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.backupTime = backupTime;
    self.backupPeriod = backupPeriod;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self backupTime])
    {
        [result setValue:[self backupTime] forKey:@"backupTime"];
    }
    if([self backupPeriod])
    {
        [result setValue:[self backupPeriod] forKey:@"backupPeriod"];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.backupTime = [dictionary objectForKey:@"backupTime"];
    self.backupPeriod = [dictionary objectForKey:@"backupPeriod"];
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisCreateCacheInstanceResult
-(id) initWithCacheInstanceId:(NSString*) cacheInstanceId
        orderNum:(NSString*)orderNum { 
    self.cacheInstanceId = cacheInstanceId;               
    self.orderNum = orderNum;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    if([self orderNum])
    {
        [result setValue:[self orderNum] forKey:@"orderNum"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    self.orderNum = [dictionary objectForKey:@"orderNum"];
    return self;
} 

@end
@implementation RedisModifyCacheInstanceClassRequest
-(id) initWithRegion:(NSString *)regionId
cacheInstanceClass:(NSString*)cacheInstanceClass
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.cacheInstanceClass = cacheInstanceClass;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
cacheInstanceClass:(NSString*)cacheInstanceClass
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.cacheInstanceClass = cacheInstanceClass;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self cacheInstanceClass])
    {
        [result setValue:[self cacheInstanceClass] forKey:@"cacheInstanceClass"];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cacheInstanceClass = [dictionary objectForKey:@"cacheInstanceClass"];
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisDescribeInstanceConfigRequest
-(id) initWithRegion:(NSString *)regionId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisDescribeDownloadUrlRequest
-(id) initWithRegion:(NSString *)regionId
baseId:(NSString*)baseId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.baseId = baseId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
baseId:(NSString*)baseId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.baseId = baseId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self baseId])
    {
        [result setValue:[self baseId] forKey:@"baseId"];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.baseId = [dictionary objectForKey:@"baseId"];
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisModifyCacheInstanceClassResult
-(id) initWithOrderNum:(NSString*) orderNum { 
    self.orderNum = orderNum;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self orderNum])
    {
        [result setValue:[self orderNum] forKey:@"orderNum"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.orderNum = [dictionary objectForKey:@"orderNum"];
    return self;
} 

@end
@implementation RedisRestoreInstanceRequest
-(id) initWithRegion:(NSString *)regionId
baseId:(NSString*)baseId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.baseId = baseId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
baseId:(NSString*)baseId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.baseId = baseId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self baseId])
    {
        [result setValue:[self baseId] forKey:@"baseId"];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.baseId = [dictionary objectForKey:@"baseId"];
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisDescribeCacheInstanceRequest
-(id) initWithRegion:(NSString *)regionId
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisDescribeInstanceClassRequest
-(id) initWithRegion:(NSString *)regionId
redisVersion:(NSString*)redisVersion { 
    self.regionId = regionId;
    self.redisVersion = redisVersion;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
redisVersion:(NSString*)redisVersion { 
    self.regionId = regionId;
    self.version = version;
    self.redisVersion = redisVersion;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self redisVersion])
    {
        [result setValue:[self redisVersion] forKey:@"redisVersion"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.redisVersion = [dictionary objectForKey:@"redisVersion"];
    return self;
} 

@end
@implementation RedisDescribeUserQuotaResult
-(id) initWithQuota:(Quota*) quota { 
    self.quota = quota;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self quota])
    {
        [result setValue:[[self quota] dictionary]forKey:@"quota"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.quota = [[Quota alloc]initWithDic:[dictionary objectForKey:@"quota"]];
    return self;
} 

@end
  
@implementation RedisDescribeUserQuotaResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDescribeUserQuotaResult* result = [[RedisDescribeUserQuotaResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDescribeUserQuotaResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisDescribeUserQuotaRequest
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
@implementation RedisDescribeInstanceConfigResult
-(id) initWithInstanceConfig:(NSArray<ConfigItem*>*) instanceConfig { 
    self.instanceConfig = instanceConfig;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceConfig])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self instanceConfig] count]; i++) {
            ConfigItem* item = [[self instanceConfig] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"instanceConfig"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* instanceConfigArray = [dictionary objectForKey:@"instanceConfig"];
    if(instanceConfigArray&&![instanceConfigArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [instanceConfigArray count];i++)
        {
        ConfigItem* item = [[ConfigItem alloc]initWithDic:[instanceConfigArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.instanceConfig = propertyArray;
    }
    return self;
} 

@end
  
@implementation RedisDescribeInstanceConfigResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDescribeInstanceConfigResult* result = [[RedisDescribeInstanceConfigResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDescribeInstanceConfigResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisModifyInstanceConfigRequest
-(id) initWithRegion:(NSString *)regionId
instanceConfig:(NSArray<ConfigItem*>*)instanceConfig
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.instanceConfig = instanceConfig;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
instanceConfig:(NSArray<ConfigItem*>*)instanceConfig
cacheInstanceId:(NSString*)cacheInstanceId { 
    self.regionId = regionId;
    self.version = version;
    self.instanceConfig = instanceConfig;
    self.cacheInstanceId = cacheInstanceId;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self instanceConfig])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self instanceConfig] count]; i++) {
            ConfigItem* item = [[self instanceConfig] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"instanceConfig"];
    }
    if([self cacheInstanceId])
    {
        [result setValue:[self cacheInstanceId] forKey:@"cacheInstanceId"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* instanceConfigArray = [dictionary objectForKey:@"instanceConfig"];
    if(instanceConfigArray&&![instanceConfigArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [instanceConfigArray count];i++)
        {
        ConfigItem* item = [[ConfigItem alloc]initWithDic:[instanceConfigArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.instanceConfig = propertyArray;
    }
    self.cacheInstanceId = [dictionary objectForKey:@"cacheInstanceId"];
    return self;
} 

@end
@implementation RedisDescribeCacheInstancesResult
-(id) initWithCacheInstances:(NSArray<CacheInstance*>*) cacheInstances
        totalCount:(NSNumber*)totalCount { 
    self.cacheInstances = cacheInstances;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self cacheInstances])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self cacheInstances] count]; i++) {
            CacheInstance* item = [[self cacheInstances] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"cacheInstances"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* cacheInstancesArray = [dictionary objectForKey:@"cacheInstances"];
    if(cacheInstancesArray&&![cacheInstancesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [cacheInstancesArray count];i++)
        {
        CacheInstance* item = [[CacheInstance alloc]initWithDic:[cacheInstancesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.cacheInstances = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
@implementation RedisDescribeBackupsResult
-(id) initWithBackups:(NSArray<Backup*>*) backups
        totalCount:(NSNumber*)totalCount { 
    self.backups = backups;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self backups])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self backups] count]; i++) {
            Backup* item = [[self backups] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"backups"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* backupsArray = [dictionary objectForKey:@"backups"];
    if(backupsArray&&![backupsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [backupsArray count];i++)
        {
        Backup* item = [[Backup alloc]initWithDic:[backupsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.backups = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation RedisDescribeBackupsResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDescribeBackupsResult* result = [[RedisDescribeBackupsResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDescribeBackupsResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisDescribeDownloadUrlResult
-(id) initWithDownloadUrls:(NSArray<DownloadUrl*>*) downloadUrls { 
    self.downloadUrls = downloadUrls;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self downloadUrls])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self downloadUrls] count]; i++) {
            DownloadUrl* item = [[self downloadUrls] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"downloadUrls"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* downloadUrlsArray = [dictionary objectForKey:@"downloadUrls"];
    if(downloadUrlsArray&&![downloadUrlsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [downloadUrlsArray count];i++)
        {
        DownloadUrl* item = [[DownloadUrl alloc]initWithDic:[downloadUrlsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.downloadUrls = propertyArray;
    }
    return self;
} 

@end
@implementation RedisResetCacheInstancePasswordResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation RedisResetCacheInstancePasswordResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisResetCacheInstancePasswordResult* result = [[RedisResetCacheInstancePasswordResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisResetCacheInstancePasswordResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisModifyCacheInstanceAttributeResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation RedisModifyCacheInstanceAttributeResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisModifyCacheInstanceAttributeResult* result = [[RedisModifyCacheInstanceAttributeResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisModifyCacheInstanceAttributeResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisModifyBackupPolicyResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation RedisModifyBackupPolicyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisModifyBackupPolicyResult* result = [[RedisModifyBackupPolicyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisModifyBackupPolicyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation RedisDescribeDownloadUrlResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDescribeDownloadUrlResult* result = [[RedisDescribeDownloadUrlResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDescribeDownloadUrlResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisRestoreInstanceResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation RedisRestoreInstanceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisRestoreInstanceResult* result = [[RedisRestoreInstanceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisRestoreInstanceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisDescribeClusterInfoResult
-(id) initWithInfo:(ClusterInfo*) info { 
    self.info = info;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self info])
    {
        [result setValue:[[self info] dictionary]forKey:@"info"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.info = [[ClusterInfo alloc]initWithDic:[dictionary objectForKey:@"info"]];
    return self;
} 

@end
  
@implementation RedisDescribeClusterInfoResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDescribeClusterInfoResult* result = [[RedisDescribeClusterInfoResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDescribeClusterInfoResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation RedisDescribeCacheInstancesResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDescribeCacheInstancesResult* result = [[RedisDescribeCacheInstancesResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDescribeCacheInstancesResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation RedisCreateBackupResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisCreateBackupResult* result = [[RedisCreateBackupResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisCreateBackupResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation RedisCreateCacheInstanceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisCreateCacheInstanceResult* result = [[RedisCreateCacheInstanceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisCreateCacheInstanceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation RedisModifyCacheInstanceClassResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisModifyCacheInstanceClassResult* result = [[RedisModifyCacheInstanceClassResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisModifyCacheInstanceClassResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisCreateCacheInstanceRequest
-(id) initWithRegion:(NSString *)regionId
cacheInstance:(CacheInstanceSpec*)cacheInstance
charge:(ChargeSpec*)charge { 
    self.regionId = regionId;
    self.cacheInstance = cacheInstance;
    self.charge = charge;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
cacheInstance:(CacheInstanceSpec*)cacheInstance
charge:(ChargeSpec*)charge { 
    self.regionId = regionId;
    self.version = version;
    self.cacheInstance = cacheInstance;
    self.charge = charge;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self cacheInstance])
    {
        [result setValue:[[self cacheInstance] dictionary]forKey:@"cacheInstance"];
    }
    if([self charge])
    {
        [result setValue:[[self charge] dictionary]forKey:@"charge"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cacheInstance = [[CacheInstanceSpec alloc]initWithDic:[dictionary objectForKey:@"cacheInstance"]];
    self.charge = [[ChargeSpec alloc]initWithDic:[dictionary objectForKey:@"charge"]];
    return self;
} 

@end
@implementation RedisDescribeCacheInstancesRequest
-(id) initWithRegion:(NSString *)regionId
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
filters:(NSArray<Filter*>*)filters
sorts:(NSArray<Sort*>*)sorts
tagFilters:(NSArray<TagFilter*>*)tagFilters { 
    self.regionId = regionId;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.filters = filters;
    self.sorts = sorts;
    self.tagFilters = tagFilters;
    return self;
}

-(id) initWithRegion:(NSString *)regionId
             version:(NSString *)version
pageNumber:(NSNumber*)pageNumber
pageSize:(NSNumber*)pageSize
filters:(NSArray<Filter*>*)filters
sorts:(NSArray<Sort*>*)sorts
tagFilters:(NSArray<TagFilter*>*)tagFilters { 
    self.regionId = regionId;
    self.version = version;
    self.pageNumber = pageNumber;
    self.pageSize = pageSize;
    self.filters = filters;
    self.sorts = sorts;
    self.tagFilters = tagFilters;
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    NSMutableDictionary *superObjectDic = [super dictionary];
    if(superObjectDic && [superObjectDic count]>0)
    {
        [result addEntriesFromDictionary:superObjectDic];
    }
    if([self pageNumber])
    {
        [result setValue:[self pageNumber] forKey:@"pageNumber"];
    }
    if([self pageSize])
    {
        [result setValue:[self pageSize] forKey:@"pageSize"];
    }
    if([self filters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self filters] count]; i++) {
            Filter* item = [[self filters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"filters"];
    }
    if([self sorts])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self sorts] count]; i++) {
            Sort* item = [[self sorts] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"sorts"];
    }
    if([self tagFilters])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self tagFilters] count]; i++) {
            TagFilter* item = [[self tagFilters] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"tagFilters"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.pageNumber = [dictionary objectForKey:@"pageNumber"];
    self.pageSize = [dictionary objectForKey:@"pageSize"];
    NSArray* filtersArray = [dictionary objectForKey:@"filters"];
    if(filtersArray&&![filtersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [filtersArray count];i++)
        {
        Filter* item = [[Filter alloc]initWithDic:[filtersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.filters = propertyArray;
    }
    NSArray* sortsArray = [dictionary objectForKey:@"sorts"];
    if(sortsArray&&![sortsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [sortsArray count];i++)
        {
        Sort* item = [[Sort alloc]initWithDic:[sortsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.sorts = propertyArray;
    }
    NSArray* tagFiltersArray = [dictionary objectForKey:@"tagFilters"];
    if(tagFiltersArray&&![tagFiltersArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [tagFiltersArray count];i++)
        {
        TagFilter* item = [[TagFilter alloc]initWithDic:[tagFiltersArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.tagFilters = propertyArray;
    }
    return self;
} 

@end
@implementation RedisDescribeSlowLogResult
-(id) initWithSlowLogs:(NSArray<SlowLog*>*) slowLogs
        totalCount:(NSNumber*)totalCount { 
    self.slowLogs = slowLogs;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self slowLogs])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self slowLogs] count]; i++) {
            SlowLog* item = [[self slowLogs] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"slowLogs"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* slowLogsArray = [dictionary objectForKey:@"slowLogs"];
    if(slowLogsArray&&![slowLogsArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [slowLogsArray count];i++)
        {
        SlowLog* item = [[SlowLog alloc]initWithDic:[slowLogsArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.slowLogs = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation RedisDescribeSlowLogResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDescribeSlowLogResult* result = [[RedisDescribeSlowLogResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDescribeSlowLogResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisDeleteCacheInstanceResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation RedisDeleteCacheInstanceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDeleteCacheInstanceResult* result = [[RedisDeleteCacheInstanceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDeleteCacheInstanceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
  
@implementation RedisDescribeBackupPolicyResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDescribeBackupPolicyResult* result = [[RedisDescribeBackupPolicyResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDescribeBackupPolicyResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisDescribeCacheInstanceResult
-(id) initWithCacheInstance:(CacheInstance*) cacheInstance { 
    self.cacheInstance = cacheInstance;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self cacheInstance])
    {
        [result setValue:[[self cacheInstance] dictionary]forKey:@"cacheInstance"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    self.cacheInstance = [[CacheInstance alloc]initWithDic:[dictionary objectForKey:@"cacheInstance"]];
    return self;
} 

@end
  
@implementation RedisDescribeCacheInstanceResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDescribeCacheInstanceResult* result = [[RedisDescribeCacheInstanceResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDescribeCacheInstanceResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisModifyInstanceConfigResult
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    return self;
} 

@end
  
@implementation RedisModifyInstanceConfigResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisModifyInstanceConfigResult* result = [[RedisModifyInstanceConfigResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisModifyInstanceConfigResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
@implementation RedisDescribeInstanceClassResult
-(id) initWithInstanceClasses:(NSArray<InstanceClass*>*) instanceClasses
        totalCount:(NSNumber*)totalCount { 
    self.instanceClasses = instanceClasses;               
    self.totalCount = totalCount;               
    return self;
}
-(NSMutableDictionary*) dictionary{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init];
    if([self instanceClasses])
    {
            NSMutableArray<NSDictionary*>* arrayDic  = [[NSMutableArray alloc] init];
            for (int i =0 ; i< [[self instanceClasses] count]; i++) {
            InstanceClass* item = [[self instanceClasses] objectAtIndex:i];
            [arrayDic addObject:[item dictionary]];
        }
        [result setValue:arrayDic forKey:@"instanceClasses"];
    }
    if([self totalCount])
    {
        [result setValue:[self totalCount] forKey:@"totalCount"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary{
    NSArray* instanceClassesArray = [dictionary objectForKey:@"instanceClasses"];
    if(instanceClassesArray&&![instanceClassesArray isKindOfClass:[NSNull class]])
    {
        NSMutableArray* propertyArray = [[NSMutableArray alloc]init];
        for(int i = 0 ; i< [instanceClassesArray count];i++)
        {
        InstanceClass* item = [[InstanceClass alloc]initWithDic:[instanceClassesArray objectAtIndex:i]];
            if(item)
            {
            [propertyArray addObject:item];
            }
        }
        self.instanceClasses = propertyArray;
    }
    self.totalCount = [dictionary objectForKey:@"totalCount"];
    return self;
} 

@end
  
@implementation RedisDescribeInstanceClassResponse
-(NSMutableDictionary*) dictionary
{
    NSMutableDictionary* result = [[NSMutableDictionary alloc] init]; 
    if([self requestId])
    {
        [result setValue:[self requestId] forKey:@"requestId"];
    } 
    if([self result])
    {
        
        [result setValue:[[self result] dictionary] forKey:@"result"];
    }
    if([self error])
    {
        
        [result setValue:[[self error] dictionary] forKey:@"error"];
    }
    return result;
}

-(id) initWithDic:(NSDictionary*)dictionary
{
    
    self.requestId = [dictionary objectForKey:@"requestId"];
RedisDescribeInstanceClassResult* result = [[RedisDescribeInstanceClassResult alloc]initWithDic:[dictionary objectForKey:@"result"]];
    self.result = result;
    ServiceError* error = [[ServiceError alloc]initWithDic:[dictionary objectForKey:@"error"]];
    self.error = error;
    return self;
}

-(id) initWithRequestId:(NSString*) requestId
                  error:(ServiceError*) error
                 result:(RedisDescribeInstanceClassResult*) result
{
    self.error = error;
    self.result =result;
    self.requestId = requestId;
    return self;
}

@end
 
